<?php
class Adm_Form_ReasonFamily
	extends Zend_Form
{
	public function init( )
	{				
	
		$this->setMethod('post');
		
		$name = new Zend_Form_Element_Text('name');
		$name->setLabel('Nombre');
		$name->setRequired(true);
//		$name->addValidator(new Zend_Validate_StringLength(2, 44));	
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setLabel('Enviar');
		
		$this->addElement($name);
		$this->addElement($submit);
	}
	
	public function loadDefaultDecorators()	{
		
		$elements = $this->getElements();
		unset($elements['submit']);
		
		$this->addDecorator('FormElements')
			->addDecorator('HtmlTag', 	array('tag' => 'div', 'class' => 'zend_form'))
			->addDecorator('Form')
			->setElementDecorators(array(
				array('ViewHelper'),
				array('Errors', array('placement' => 'APPEND')),
				array('Description', 	array('tag' => 'em', 'class' => 'element-description')),
				array('Label', 			array('separator' => ' ', 'placement' => 'PREPEND')),
				array('HtmlTag', 		array('tag' => 'div', 'class' => 'el-group')),
				),
				array_keys($elements)
			);	

		$this->setElementDecorators(array(
				array('ViewHelper'),				
				array('HtmlTag', 		array('tag' => 'div', 'class' => 'submit-group')),
				),
				array('submit')
			);
	
	}



}